package com.mdd.admin.validate.way;

import com.mdd.common.validator.annotation.IntegerContains;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 支付方式参数
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "支付方式请求对象",description = "支付方式请求对象")
public class DevPayWayParam implements Serializable {

    private static final long serialVersionUID = 1L;

    public interface create{}
    public interface update{}
    public interface delete{}

    @ApiModelProperty(value = "id")
    @NotNull(message = "id参数必传且需大于0", groups = {update.class, delete.class})
    private Long id;

    @ApiModelProperty(value = "场景:1-微信小程序;2-微信公众号;3-H5;4-PC商城;5-APP;")
    @NotNull(message = "scene参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "scene参数值不能少于0", groups = {create.class, update.class})
    private Integer scene;

    @ApiModelProperty(value = "支付配置ID")
    @NotNull(message = "payId参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "payId参数值不能少于0", groups = {create.class, update.class})
    private Integer payId;

    @ApiModelProperty(value = "是否默认支付:0-否;1-是;")
    @NotNull(message = "isDefault参数缺失", groups = {create.class, update.class})
    @IntegerContains(values = {0, 1}, message = "isDefault参数值不在符合范围", groups = {create.class, update.class})
    private Integer isDefault;

    @ApiModelProperty(value = "状态:0-关闭;1-开启;")
    @NotNull(message = "status参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "status参数值不能少于0", groups = {create.class, update.class})
    private Integer status;

}
